package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * 将所有小写字母写入文件fos.txt
 */
public class Test {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("fos.txt");
        for(int i=97;i<123;i++){
            char a=(char) i;
            fos.write(a);
            fos.close();
        }
        System.out.println("写出成功");
    }
}
